<%@ page import="dart.Person" %>
${people = Person.findAllByEnabled(!disabled, [sort:"displayName", order:"asc"])}

<html>
<head>
	<title>People</title>
	<meta name="layout" content="dart"/>
	<dart:css src="person.css"/>
</head>
<body>
<h1>${disabled ? "Disabled " : ""}People</h1>
<div id="person">
	<g:each in="${people}" var="person">
		<g:link action="editPerson" id="${person.id}" class="person" style="${person.style()};">
			${person.displayName}
		</g:link>
	</g:each>


	<g:if test="${disabled}">
		<g:link action="listPeople">Show Enabled People</g:link>
	</g:if>
	<g:else>
		<g:link action="createPerson">New Person</g:link><br>
		<g:link action="listPeople" params="${[disabled: true]}">Show Disabled People</g:link>
	</g:else>
</div>
</body>
</html>
